/**
 * @author tianchao
 */
import request from '@/utils/request'
/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}
/**
 * 获取角色对应用户列表
 * @param {*} query
 */
export function userList(query) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDataAuthority/queryPage',
    method: 'post',
    data: query
  })
}
/**
 * 为角色添加用户
 * @param {*} query
 */
export function insertRoleUser(query) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDataAuthority/insert',
    method: 'post',
    data: query
  })
}
/**
 * 删除角色权限用户
 * @param {*} ids
 */
export function deleteUser(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDataAuthority/delete',
    method: 'post',
    data: { ids }
  })
}
/**
 * 查询角色列表
 * @param {*} query
 */
export function queryUserRole(query) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysUserLogin/queryPage',
    method: 'post',
    data: query
  })
}
